#include "head.h"

int cmdSplit(char *cmd,char **operate,char **object){
    *operate = strtok(cmd," ");
    *object = strtok(NULL," ");
    return 0;
}

int recvn(int sockfd, void *buf, int n){
    int total = 0;
    char *p = (char *)buf;
    while(total < n){
        ssize_t sret = recv(sockfd,p+total,n-total,0);
        total += sret;
    }
    return 0;
}

